package com.joker.microstoremanager.repository;

import com.joker.microstoremanager.model.MicroShop;
import com.joker.microstoremanager.model.Tag;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface TagRepository extends JpaRepository<Tag,Long> {
    Tag findByName(String tagName);

    List<Tag> findByShop(MicroShop shoop);

    Tag findByShopIdAndName(Long shopId,String name);

    Page<Tag> findByShopId(Long id, Pageable request);
}
